<?php

namespace App\Events;

use Illuminate\Broadcasting\Channel;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Broadcasting\PresenceChannel;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;

class Application
{
    use Dispatchable, InteractsWithSockets, SerializesModels;

    /**
     * Create a new event instance.
     *
     * @return void
     */
    public $type;
    public $source;
    public $model;
    public $user_id;
    public $source_id;
    public $project_id;
    public $reason;
    public $payment_type;
    public $pay_info;
    public $price;
    public function __construct($type,$source,$model,$user_id,$source_id,$project_id,$reason,$payment_type,$pay_info,$price)
    {
        $this->type = $type;
        $this->source = $source;
        $this->model = $model;
        $this->user_id = $user_id;
        $this->source_id = $source_id;
        $this->project_id = $project_id;
        $this->reason = $reason;
        $this->payment_type = $payment_type;
        $this->pay_info = $pay_info;
        $this->price = $price;
    }

    /**
     * Get the channels the event should broadcast on.
     *
     * @return \Illuminate\Broadcasting\Channel|array
     */
    public function broadcastOn()
    {
        return new PrivateChannel('channel-name');
    }
}
